//
//  EmptyView.m
//  SXH
//
//  Created by Ryan on 15/11/19.
//  Copyright © 2015年 lyss. All rights reserved.
//

#import "EmptyView.h"

@implementation EmptyView
- (instancetype)initWithFrame:(CGRect)frame andImagestr:(NSString *)imgstr andTitle1:(NSString*)title1 andTitle2:(NSString*)title2
{
    self = [super initWithFrame:frame];
    if (self) {
        self.pic_img = [[UIImageView alloc]initWithFrame:CGRectMake((self.frame.size.width - 84)/2.0, 0, 84, 39)];
        self.pic_img.image = [UIImage imageNamed:imgstr];
        [self addSubview:self.pic_img];
        
        self.titlelabel1 = [[UILabel alloc]initWithFrame:CGRectMake(0,self.pic_img.frame.origin.y + self.pic_img.frame.size.height +15, self.frame.size.width, 18)];
        self.titlelabel1.textColor = [UIColor colorWithRed:0.749f green:0.749f blue:0.749f alpha:1.00f];
        self.titlelabel1.font = [UIFont systemFontOfSize:18];
        self.titlelabel1.textAlignment = NSTextAlignmentCenter;
        self.titlelabel1.text = title1;
        [self addSubview:self.titlelabel1];
        
        self.titlelabel2 = [[UILabel alloc]initWithFrame:CGRectMake(0, self.titlelabel1.frame.origin.y + self.titlelabel1.frame.size.height +12, self.frame.size.width, 14)];
        self.titlelabel2.textColor = [UIColor colorWithRed:0.475f green:0.475f blue:0.475f alpha:1.00f];
        self.titlelabel2.font = [UIFont systemFontOfSize:14];
        self.titlelabel2.textAlignment = NSTextAlignmentCenter;
        self.titlelabel2.text = title2;
        [self addSubview:self.titlelabel2];
    }
    return self;
}

- (void)setImgstr:(NSString *)imgstr
{
    self.pic_img.image = [UIImage imageNamed:imgstr];
}

- (void)setTitle1:(NSString *)title1
{
    self.titlelabel1.text = title1;
}

- (void)setTitle2:(NSString *)title2
{
    self.titlelabel2.text = title2;
}



@end
